package fudan.se.project.service.infrastructure.entity.conference.post;

import fudan.se.project.domain.conference.post.Reply;
import fudan.se.project.repository.entity.conference.post.ReplyRepository;
import fudan.se.project.service.infrastructure.base.IEntityService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Collection;

@Slf4j
@Service
public class ReplyService implements IEntityService<Reply> {
    private final ReplyRepository replyRepository;

    public ReplyService(ReplyRepository replyRepository) {
        this.replyRepository = replyRepository;
    }

    @Override
    public Reply findById(long id) {
        return replyRepository.findById(id);
    }

    @Override
    public Reply save(Reply reply) {
        return replyRepository.save(reply);
    }

    @Override
    public Iterable<Reply> saveAll(Collection<Reply> replies) {
        return replyRepository.saveAll(replies);
    }
}
